<template>
<div>
  <Button className={Styles.upload_wrap}>
    导入Excel
    <input class=Styles.file_uploader type='file' accept='.xlsx, .xls' onChange={this.onImportExcel} /> 
    //这里对原有的input样式进行了修改，accept 属性定义了上传文件支持的类型，onChange 操作中的 importExcel 方法定义了上传文件时执行的操作。 
</Button>
</div>
</template>
<script>
export default {
   data: () => ({})
}
</script>
<style lang="scss" scoped>
.upload_wrap {
  display: inline-block;
  position: relative;
  width: 94px;
  padding: 3px 5px;
  overflow: hidden;
}

.file_uploader {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  outline: none;
  opacity: 0;
  background-color: transparent;
}

.upload_text {
  display: inline-block;
  margin-left: 5px;
}

.upload_tip {
  display: inline-block;
  margin-left: 10px;
  color: #999;
}

</style>